package com.example.yuejian.yuejian.bean;

import com.google.gson.Gson;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2017/10/11.
 */

public class ClubVideo {

    /**
     * id : 1
     * name : qweq
     * video : http://10.0.2.2/laravel54/public/VUploads/2017-09-05-05-43-34-59ae3986738f0.mp4
     * pic : qweqw
     * club_id : 1
     */

    private int id;
    private String name;
    private String video;
    private String pic;
    private int club_id;

    public static ClubVideo objectFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);

            return new Gson().fromJson(jsonObject.getString(str), ClubVideo.class);
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setVideo(String video) {
        this.video = video;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public void setClub_id(int club_id) {
        this.club_id = club_id;
    }

    public int getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public String getVideo() {
        return video;
    }

    public String getPic() {
        return pic;
    }

    public int getClub_id() {
        return club_id;
    }
}
